<template>
	<view class="announcementDetail">
		<u-parse :html="content"></u-parse>
	</view>
</template>

<script>
	var util = require('../../common/util.js');
	export default {
		data() {
			return {
				id:'',
				content: ''
			}
		},
		onLoad(opt) {
			this.id = opt.id;
			this.loadData(true);
		},
		methods: {
			loadData: function(is_loading){
				
				if(is_loading == undefined){
					is_loading = false;
				}
				// 加载数据
				var that = this;
				util.requestPost("api.php/home/articleDetail", {id:this.id,is_update_click:true}, function(res) {
					that.content = res.data.article.content;
					uni.setNavigationBarTitle({
						title:res.data.article.title
					});
				},is_loading);
			}
		}
	}
</script>

<style scoped>
.announcementDetail {
	padding: 32rpx;
}
</style>
